<template>
	
	<view class="content">
		<view class="yqr">
			<view class="sheader">我的收款码</view>
		</view>
		<view>
			<view class="code">
				<view v-if="shop==1" >
					<tki-qrcode
					ref="qrcode"
					cid="1"
					:val='tel+type'
					size="400"
					unit="upx"
					background="#ffffff"
					foreground="#000000"
					icon="/static/yiduoduoicon.png"
					iconSize="40"
					onval="true"  
					loadMake="true"
					usingComponents="true"
					showLoading="true"
					loadingText="加载中..."
					@result="qrR" />
				</view>
				<view v-else style="background: #909399;width: 402upx;
			height: 402upx;">
					{{msg}}
				</view>
			</view>
			
		</view>


		</view>
</template>

<script>
	import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
	export default {
	    components: {tkiQrcode},
		data() {
        return {
           erweima:'',
		   invite:'',
		   tel:'asdf',
		   wz:'http://tuiguang.yiyunoto.com',
		  type:'',
		  shop:'',
		  msg:'',
        }
    },
	onLoad() {
		uni.request({
			url:'http://tuiguang.yiyunoto.com/api/member/receivablescode',
			header:{authtoken:this.$store.state.token},
			method:'POST',
			success:(res)=>{
				console.log("请求成功",res)
				this.shop=res.data.code
				this.msg=res.data.msg
				this.tel=res.data.data.phone
				this.type=res.data.data.shou
			},
			fail:(res)=>{
				console.log("请求失败",res)
			}
		})
	},
    methods: {
		qrR(){
			console.log("哟放映")
		},	
	},
	}
</script>

<style>
	
	.content{
		width: 100%;
		height:100vh;
		
	}
	.yao{
		text-align: center;
		padding-top: 20upx;
		box-sizing: border-box;
	}
	.yqr{
		position: absolute;
		top: 130upx;
		margin-left: 200upx;
	}
	.sheader{
		font-size:60upx ;
		padding: 10upx;
		text-align: center;
	}
	.code{
			width: 402upx;
			height: 402upx;
			position: relative;
			left:176upx ;
			top: 250upx;
			
		}
		
</style>
